package cn.edu.scau.cmi.dengzejun.chapter08;

public class Bank {
	int money;
	public void income(int in ,int out) throws BankException{
		if ((in<=0)||(out>=0) || (in+out<=0)) {
			throw new BankException(in,out);
		}
		int netIncome=in +out;
		System.out.printf("the pure income is %d yuan\n", netIncome);
		money+=netIncome;
		return;
	}
	
	public int getMoney() {
		return money;
	}
}
